<div class="crumb-wrap">
    <div class="crumb-list"> <i class="icon-font"></i>
        <a href="<?=site_url()?>">首页</a>
        <span class="crumb-step">&gt;</span>
        <a class="crumb-name" href="<?=site_url('qrset/index')?>">活码管理</a>
        <span class="crumb-step">&gt;</span>
        <span>修改二维码</span>
    </div>
</div>
<div class="result-wrap">
    <div class="result-content">
        <form action="<?=site_url('qrset/update')?>" method="post" id="myform" name="myform">
            <table class="insert-tab" width="100%">
                <tbody>
                    <tr>
                        <th width="120">
                            <i class="require-red">*</i>
                            名称：
                        </th>
                        <td>
                            <input class="common-text required" id="title" name="name" size="50" value="<?=$res['name']?>" type="text">
                            <span>备注该二维码名称</span>
                        </td>
                    </tr>
                    <tr>
                        <th width="120">
                            <i class="require-red">*</i>
                            链接：
                        </th>
                        <td>
                            <input class="common-text required" id="title" name="content" size="50" value="<?=$res['content']?>" type="text">
                            <span>请添加http， 否则二维码无效</span>
                        </td>
                    </tr>
                    <tr>
                        <th></th>
                        <td>
                            <input type="hidden" name="cid" value="<?=$res['id']?>">
                            <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                            <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button"></td>
                    </tr>
                </tbody>
            </table>
        </form>
    </div>
</div>

<script type="text/javascript">

    $('#myform').submit(function() {
        var index = layer.load(2);
        $(this).ajaxSubmit(function(data){
            layer.close(index);
            if(data > 0){
                layer.alert("操作成功！",{
                    icon:1,
                },function(){
                    location.href='<?=site_url("qrset/index")?>';
                });
            }else{
                layer.alert(data,{
                    icon:2,
                });
            }
        })
        return false;
    })
</script>